﻿using CaffeeBuzz_WinForm.Cafe;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CaffeeBuzz_WinForm.BuzzMenu
{
    public class BreakfastMenuIterator : Iterator
    {
        List<Item> Items;
        int position = 0;
        public BreakfastMenuIterator(List<Item> Items)
        {
            this.Items = Items;
        }

        public bool HasNext()
        {
            if (position >= Items.Count || Items.ElementAt(position) == null)
                return false;
            return true;
        }
        public Object Next()
        {
            Item mi = Items.ElementAt(position);
            position++;
            return mi;
        }

    }
}
